package org.lmj.dos.web.resultdo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

public class OrdersVo {
    //1.创建订单
    //POST /orders
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class PostOrder {
        private Long orderNo;

        private double payment;

        private int paymentType;

        private int postage;

        private int status;

        private String paymentTime;

        private String sendTime;

        private String endTime;

        private String closeTime;

        private int createTime;

        private List<OrderItemVo> orderItemVoList;

        private int shippingId;

        private String shippingVo;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class OrderItemVo {
        private Long orderNo;

        private Long productId;

        private String productName;

        private String productImage;

        private double currentUnitPrice;

        private int quantity;

        private double totalPrice;

        private String createTime;
    }
    //2.订单List
    // GET /orders
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class GetOrders {
        private int pageNum;

        private int pageSize;

        private int size;

        private String orderBy;

        private int startRow;

        private int endRow;

        private int total;

        private int pages;

        private int firstPage;

        private int prePage;

        private int nextPage;

        private int lastPage;

        @JsonProperty(value = "isFirstPage")

        private boolean isFirstPage;

        @JsonProperty(value = "isLastPage")

        private boolean isLastPage;

        private boolean hasPreviousPage;

        private boolean hasNextPage;

        private int navigatePages;

       private int navigateFirstPage;
       private int navigateLastPage;



        private List<Integer> navigatepageNums;

        private List<HaList> list;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class HaList {
        private Long orderNo;

        private double payment;

        private int paymentType;

        private String paymentTypeDesc;

        private int postage;

        private int status;

        private String statusDesc;

        private String paymentTime;

        private String sendTime;

        private String endTime;

        private String closeTime;

        private String createTime;


        private String imageHost;

        private int shippingId;

        private String receiverName;

        private ShippingVo shippingVo;

        private List<OrderItemVoList> orderItemVoList;


    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class OrderItemVoList {
        private Long orderNo;

        private int productId;

        private String productName;

        private String productImage;

        private double currentUnitPrice;

        private int quantity;

        private double totalPrice;

        private String createTime;
    }

//    #### 3.订单详情
//
//** GET /orders/{orderNo}
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class GetOrderDetailsByNo
{
    private int orderNo;

    private int payment;

    private int paymentType;

    private String paymentTypeDesc;

    private int postage;

    private int status;

    private String statusDesc;

    private String paymentTime;

    private String sendTime;

    private String endTime;

    private String closeTime;

    private String createTime;

    private List<OrderItemVoListDetail> orderItemVoList;

    private String imageHost;

    private int shippingId;

    private String receiverName;

    private ShippingVo shippingVo;
}
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class OrderItemVoListDetail
    {
        private int orderNo;

        private int productId;

        private String productName;

        private String productImage;

        private int currentUnitPrice;

        private int quantity;

        private int totalPrice;

        private String createTime;


    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class ShippingVo implements Serializable
    {
        private String receiverName;

        private String receiverPhone;

        private String receiverMobile;

        private String receiverProvince;

        private String receiverCity;

        private String receiverDistrict;

        private String receiverAddress;

        private String receiverZip;

    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class confirmItem {
        private int id;

        private int userId;

        private String receiverName;

        private String receiverPhone;

        private String receiverMobile;

        private String receiverProvince;

        private String receiverCity;

        private String receiverDistrict;

        private String receiverAddress;

        private String receiverZip;

        private String createTime;

        private String updateTime;
    }
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class OrderConfirmVo
    {
        private int total;

        private List<confirmItem> list;

        private int pageNum;

        private int pageSize;

        private int size;

        private int startRow;

        private int endRow;

        private int pages;

        private int prePage;

        private int nextPage;

        @JsonProperty(value = "isFirstPage")
        private boolean isFirstPage;

        @JsonProperty(value = "isLastPage")
        private boolean isLastPage;

        private boolean hasPreviousPage;

        private boolean hasNextPage;

        private int navigatePages;

        private List<Integer> navigatepageNums;

        private int navigateFirstPage;

        private int navigateLastPage;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class orderPay{
        private Long orderNo;

        private Double payment;

        private int paymentType;

        private String paymentTypeDesc;

        private int postage;

        private int status;

        private String statusDesc;

        private String paymentTime;

        private String sendTime;

        private String endTime;

        private String closeTime;

        private String createTime;

        private List<OrderItemVoList> orderItemVoList;

        private String imageHost;

        private Long shippingId;

        private String receiverName;

        private ShippingVo shippingVo;
    }
}









